package com.smart.manager.member.entities.bodys;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.member.entities.enums.MemberLevel;
import com.smart.manager.system.entities.enums.Sex;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * @author xiaxuqiu
 * @date 2023/03/26
 */
public class RMemberProfileMain {
    @EqualsAndHashCode(callSuper = true)
    @Data
    @ApiModel("RMemberProfileMain1")
    public static class SearchBody extends BaseSearch {

        @ApiModelProperty("真实属性")
        private Boolean realAttr;

        @ApiModelProperty("企业会员")
        private Boolean firmAttr;


        @ApiModelProperty("转化等级")
        private MemberLevel level;

        @ApiModelProperty("会员性别")
        private Sex sex;

        @ApiModelProperty("注册来源")
        private String origin;

        @ApiModelProperty("会员昵称")
        private String nickName;

        @ApiModelProperty("手机号码")
        private String phoneNumber;

        @ApiModelProperty("注册日期")
        private String dateRange;
    }


    @Data
    @ApiModel("RMemberProfileMain2")
    public static class EditBody implements Serializable {


        @ApiModelProperty("手机号码")
        @NotBlank(message = "手机号码  不能为空")
        private String phoneNumber;


        @ApiModelProperty("真实姓名")
        @NotBlank(message = "真实姓名  不能为空")
        @Length(max = 10, message = "会真实姓名不能超过10个字符")
        private String readyName;


        @ApiModelProperty("公司名称")
        @NotBlank(message = "公司名称  不能为空")
        @Length(max = 30, min = 1, message = "公司名称 不能超过 30个字符")
        private String companyName;

        @ApiModelProperty("是否有猪")
        @NotNull(message = "是否有猪 不能为空")
        private Boolean isPig = false;

        @ApiModelProperty("猪仔数量")
        private Integer pig = 0;

        @ApiModelProperty("猪仔商品")
        private String pigGoodsCode;


    }


    @Data
    @ApiModel("RMemberBasicMain3")
    public static class GeneratedBody implements Serializable {

        @ApiModelProperty("生成数量")
        @NotNull(message = "生成数量  不能为空")
        @Min(value = 1, message = "生成数量不能小于1条")
        @Max(value = 100, message = "生成数量不能大于100条")
        private Integer count;


    }

    @Data
    @ApiModel("RMemberBasicMain4")
    public static class RemarksBody implements Serializable {

        @ApiModelProperty("内容")
        private String content;


    }


}
